/* ****************************************************************************
 *
 * Copyright (c) Microsoft Corporation. 
 *
 * This source code is subject to terms and conditions of the Microsoft Public License. A 
 * copy of the license can be found in the License.html file at the root of this distribution. If 
 * you cannot locate the  Microsoft Public License, please send an email to 
 * dlr@microsoft.com. By using this source code in any fashion, you are agreeing to be bound 
 * by the terms of the Microsoft Public License.
 *
 * You must not remove this notice, or any other, from this software.
 *
 * THIS CODE AND INFORMATION ARE PROVIDED "AS IS" WITHOUT WARRANTY OF ANY
 * KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
 * IMPLIED WARRANTIES OF MERCHANTABILITY AND/OR FITNESS FOR A
 * PARTICULAR PURPOSE.
 * ***************************************************************************/

#if !defined(AFX_PGLCOREGLOBAL_H__CA5BF2BF_E840_4CF9_9059_0E15B140B14C__INCLUDED_)
#define AFX_PGLCOREGLOBAL_H__CA5BF2BF_E840_4CF9_9059_0E15B140B14C__INCLUDED_

#if _MSC_VER > 1000
#pragma once
#endif // _MSC_VER > 1000

/*! \brief DLL helper functions

  \ingourp PGLCoreGroup
*/
class PGLCORE_EXT_CLASS CPGLCoreGlobal  
{
public:
	//! returns current version string
	static LPCTSTR GetVersion();
	//! returns current instance, use it to access PGLCore ressource
	static HMODULE GetInstance();
};

namespace pgl
{
	template <class T>
	class THasParent
	{
	public:
		typedef boost::static_ptr<T> ParentStPtr;
	
		//! \name Setter and getter for the parent region
		//@{
		//! Returns pointer to parent
		ParentStPtr GetParent()												{ return m_pParent;};
		//! Sets pointer to parent
		void SetParent(ParentStPtr pParent)									{ m_pParent = pParent;};
		//@}

	private:
		boost::static_ptr<T> m_pParent;
	};

};

#endif // !defined(AFX_PGLCOREGLOBAL_H__CA5BF2BF_E840_4CF9_9059_0E15B140B14C__INCLUDED_)
